package com.fastjars.framework.pojo;

import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Page
 *
 * @author Brant Liu <br> 邮箱：<br>lbf1988@qq.com <br>日期：<br>2018/2/12
 * @version 1.0.0
 */
public class Page<T> implements Serializable {
    private Integer count;

    private List<T> data;

    public Page() {
    }

    public Page(Page<T> page) {
        if(null != page) {
            BeanUtils.copyProperties(page, this);
        }
    }

    public Page(Integer count, List<T> data) {
        this.count = count;
        this.data = data;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
